<?php

use yii\db\Migration;

/**
 * Handles the creation of table `package_update_log`.
 */
class m171101_022106_create_package_update_log_table extends Migration
{
    /**
     * @inheritdoc
     * 资产包数据更新记录
     */
    public function up()
    {
        $this->createTable('package_update_log', [
            'id' => $this->bigPrimaryKey(),
            'package_id' => $this->bigInteger()->notNull(),
            'module' => $this->string()->notNull()->comment('模块'),
            'created_at' => $this->timestamp()->comment('操作时间'),
            'user_id' => $this->integer()->comment('操作人'),
            'log' => $this->text()->comment('操作内容'),
        ]);
    }

    /**
     * @inheritdoc
     */
    public function down()
    {
        $this->dropTable('package_update_log');
    }
}
